package com.love.cloud.admin.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.love.cloud.admin.api.vo.SysAuthLogVo;
import com.love.cloud.admin.service.AuthLogService;
import com.love.cloud.common.core.util.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author hongdongqu
 */
@RestController
@RequestMapping("/log")
@Slf4j
public class AuthLogController {
    @Resource
    private AuthLogService authLogService;

    /**
     * 简单分页查询
     * @param page 分页对象
     * @param sysAuthLogVo 系统登录日志
     * @return
     */
    @GetMapping("/page")
    public R getLogPage(Page page, SysAuthLogVo sysAuthLogVo) {
        return R.ok(authLogService.getLogByPage(page, sysAuthLogVo));
    }

}
